//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.wang.controller;

import com.google.gson.Gson;
import com.wang.pojo.DevConConfig;
import com.wang.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.context.ServletContextAware;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

public class BaseController implements ServletContextAware {
    protected HttpServletRequest request;
    protected HttpServletResponse response;
    protected HttpSession session;
    protected ServletContext servletContext;


    @Autowired
    protected DevMdtParamConfService mParamConfService;
    @Autowired
    protected DevMdtParamConfDataService mParamConfDataService;
    @Autowired
    protected DevJdtParamConfService jParamConfService;
    @Autowired
    protected DevJdtParamConfDataService jParamConfDataService;
    @Autowired
    protected SysDictItemService sysDictItemService;
    @Autowired
    protected SysDictTypeService sysDictTypeService;

    @Autowired
    protected DeviceService deviceService;

    @Autowired
    protected DevTypeConConfigService conConfigService;
    @Autowired
    protected DevFunService devFunService;
    @Autowired
    protected DevCollectRateService devCollectRateService;
    @Autowired
    protected DevSwitchService devSwitchService;
    @Autowired
    protected DevConConfigService devConConfigService;
    @Autowired
    protected DevMControlService devMControlService;
    @Autowired
    protected DevMControlReturnService devMControlReturnService;
    @Autowired
    protected DevControlFunService devControlFunService;

    @Autowired
    protected UserService userService;
    @Autowired
    protected DevLogService devLogService;
    @Autowired
    protected CalibrationControlService calibrationControlService;
    @Autowired
    protected Custom2ControlService custom2ControlService;
    @Autowired
    protected Custom2ReturnService custom2ReturnService;


    protected Gson gson = new Gson();


    public BaseController() {
    }

    @ModelAttribute
    public void setReqAndRes(HttpServletRequest request, HttpServletResponse response) {
        this.request = request;
        this.response = response;
        this.session = request.getSession();
    }

    public void setServletContext(ServletContext servletContext) {
        this.servletContext = servletContext;
    }
}
